export const DICT = ['risk.overdue', 'risk.origin.type', 'risk.state.search'];

export const DATA_INFO = [
  { key: 'name', name: '名称' },
  { key: 'time', name: '时间', func: 'timeSlice' },
];

export const KEYS_EDIT = [
  'id',
  'name',
  'time',
];

export const KEYS_COUNT = [
  { name: '隐患总计', key: 'state', color: getColor(0), icon: 'icon-icon-icon-DANGER1' },
  { name: '待指派', key: 'state1', color: getColor(1), icon: 'icon-assign-to' },
  { name: '待处理', key: 'state8', color: getColor(8), icon: 'icon-shijian' },
  { name: '待核实', key: 'state16', color: getColor(16), icon: 'icon-TestDesign-VisitProcess-editors-gray' },
];

export const DETAILS_RIST_3 = [
  { key: 'userName', name: '处理人' },
  { key: 'userMobile', name: '联系方式' },
  { key: 'remark', name: '处理描述' },
];


export const DETAILS_RIST_8 = [
  { key: 'userName', name: '处理人' },
  { key: 'userMobile', name: '联系方式' },
];

export const DETAILS_RIST_2 = [
  { key: 'userName', name: '指派人' },
  { key: 'userMobile', name: '联系方式' },
  { key: 'operatorName', name: '处理人' },
  { key: 'operatorMobile', name: '联系方式' },
  { key: 'finishTime', name: '处理完成时间' },
];

export const DETAILS_RIST_4 = [
  { key: 'updateName', name: '审核人' },
  { key: 'updateMobile', name: '联系方式' },
  { key: 'result', name: '审核结果' },
  { key: 'remark', name: '审核结果说明' },
];

export function getColor(state = -1) {
  switch (state) {
    case 0:
      return '#E61219';
    case 1:
      return '#0880DF';
    case 3:
      return '#ED7109';
    case 4:
      return '#0880DF';
    case 8:
      return '#ED7109';
    case 16:
      return '#0880DF';
    case 32:
      return '#3D9B38';
    default:
      return '#0880DF';
  }
}